<template>
  <el-config-provider
    :locale="messages[theme.language]"
    :size="theme.size"
    :button="theme"
  >
    <router-view />
  </el-config-provider>
</template>

<script setup>
import { changeLanguage, messages } from '~locales'
import useThemeStore from '~stores/module/theme'

const theme = computed(() => useThemeStore().theme)
onMounted(() => {
  changeLanguage(theme.value.language)
})
</script>

<style lang="scss" scoped></style>
